home *** CD-ROM | disk | FTP | other *** search
- Path: www.cybercity.dk!usenet
- From: monsted@cybercity.dk (Monsted)
- Newsgroups: comp.lang.c
- Subject: Re: given: char foo[80]; there is no such thing as element foo[80] correct? (i.e. foo[80] = '\0' is beyond the array boundary)
- Date: Sun, 17 Mar 1996 12:55:55 GMT
- Organization: Monsted Chartering A/S
- Message-ID: <4ih0p0$7q5@vip.cybercity.dk>
- References: <3148DBB6.1353@hawaii.edu>
- NNTP-Posting-Host: 194.16.56.150
- X-Newsreader: Forte Free Agent 1.0.82
-
- Dave Carien <davec@hawaii.edu> wrote:
-
- >Yes or no on this, I just recently got confused by two different books. I
- >assume that the declaration foo[80] allocates storage for elements 0-79.
- >A string could be terminated by doing something like foo[79] = '\0', but
- >foo[80] = '\0' would be invalid because such an element does not exist.
- >Just looking for confirmation that I'm right here. A simple Y or N will
- >do thanks.
- >--
- >-Recently confused C programmer
-
- You're right!
-
- Jesper
- +----------------+-----------------------------------+
- | Jesper Monsted | monsted@cybercity.dk |
- | Denmark | |
- +----------------+-----------------------------------+
-
-